cmake_minimum_required(VERSION 3.0.0)
project(matrix-theory VERSION 0.1.0 LANGUAGES C CXX)

#--------------------------------------------------------------------
# 系统变量初始化
#--------------------------------------------------------------------
# 支持的Configuration
message("Generated with config types:" ${CMAKE_CONFIGURATION_TYPES})

#设置Product生成目录
SET(PRODUCT_EXECUTABLE_DIR ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE})
message(STATUS "PRODUCT_EXECUTABLE_DIR: " ${PRODUCT_EXECUTABLE_DIR})
#--------------------------------------------------------------------
# 添加需要包含的模块
#--------------------------------------------------------------------
# install时需要的目录变量的module
include(GNUInstallDirs)
# 打包导出配置所需要的module
include(CMakePackageConfigHelpers)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

#--------------------------------------------------------------------
# 添加子目录
#--------------------------------------------------------------------
add_subdirectory(LU_Guass)
add_subdirectory(Lnverse_Matrix)
add_subdirectory(2.2/cholesky)
add_subdirectory(2.2/Toeplitz)
add_subdirectory(2.2/tri_diag)
add_subdirectory(3/Givens)
add_subdirectory(3/Gram_Schmidt)
add_subdirectory(3/Householder)
add_subdirectory(3/Householder_GR)
add_subdirectory(3/MGS_QR)

#--------------------------------------------------------------------
# 添加自定义配置
#--------------------------------------------------------------------
# 生成后事件：创建<Configuration>目录
add_custom_target(TARGET ALL
    COMMAND ${CMAKE_COMMAND} -E make_directory ${PRODUCT_EXECUTABLE_DIR})

